Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #8159 FN unusedFunction: sole recursive call #6517

Merged
merged 12 commits into from
Jun 16, 2024

Conversation

chrchr-github
Copy link
Collaborator

No description provided.

@@ -180,7 +181,7 @@ class TestUnusedFunctions : public TestFixture {
" if (cond) ;\n"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also add the missing cond variable when fixing this up.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah - too late.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cond could be an unknown global variable.
The return2() test is not compilable though.

@chrchr-github
Copy link
Collaborator Author

chrchr-github commented Jun 12, 2024

Do we want to keep MathLib::isDigitSeparator()? It's only used in tests.
clangimport::AstNode::dumpAst() has a deactivated call somewhere. Should we remove that?
Token::astStringZ3() is useful for testing.

@firewave
Copy link
Collaborator

Do we want to keep MathLib::isDigitSeparator()? It's only used in tests.

The logic was apparently moved to simplecpp in 03d2829 shortly after it was added in 3095f47. So we should remove it.

clangimport::AstNode::dumpAst() has a deactivated call somewhere. Should we remove that? Token::astStringZ3() is useful for testing.

Add suppressions for these for now with comments which indicate how they are (not) used.

@chrchr-github
Copy link
Collaborator Author

We have a bunch of code that deals with "markup files". Is this tested explicitly anywhere?

@firewave
Copy link
Collaborator

We have a bunch of code that deals with "markup files". Is this tested explicitly anywhere?

That is tested in test/cli/qml_test.py.

@chrchr-github
Copy link
Collaborator Author

We have a bunch of code that deals with "markup files". Is this tested explicitly anywhere?

That is tested in test/cli/qml_test.py.

I see, thanks. That's one of the reasons for using strings to identify functions instead of Function*. More reasons are templates, and multiple file handling.

@chrchr-github chrchr-github merged commit 750b914 into danmar:main Jun 16, 2024
63 checks passed
@chrchr-github chrchr-github deleted the chr_8159 branch June 16, 2024 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants